package com.travel.modules.asset.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.travel.commons.utils.PageUtils;
import com.travel.commons.utils.Query;
import com.travel.modules.asset.dao.AdvertiseDao;
import com.travel.modules.asset.dao.HotelDao;
import com.travel.modules.asset.dto.HotelQueryDTO;
import com.travel.modules.asset.entity.Advertise;
import com.travel.modules.asset.entity.Hotel;
import com.travel.modules.asset.service.AdvertiseService;
import com.travel.modules.asset.service.HotelService;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Service("advertiseService")
public class AdvertiseServiceImpl extends ServiceImpl<AdvertiseDao, Advertise> implements AdvertiseService {
    @Resource
    private AdvertiseDao advertiseDao;

    @Override
    public List<Advertise> getAds() {
        return advertiseDao.getAds();
    }

    @Override
    public List<Advertise> getAllAdvertise(Map<String, Object> params) {
        return advertiseDao.getAllAdvertise(params);
    }

    @Override
    public Advertise getOneAdvertise(String adId) {
        return advertiseDao.getOneAdvertise(adId);
    }

    @Override
    public List<Advertise> ftQueryAds(String[] keywords) {
        return advertiseDao.ftQueryAds(keywords);
    }
}
